from peewee import SqliteDatabase, Model
import peewee

db = SqliteDatabase('data.sqlite', pragmas=(
        ('cache_size', 1024 * 64),  # 64MB page-cache.
        ('journal_mode', 'wal'),  # Use WAL-mode (you should always use this!).
        ('foreign_keys', 1))
    )

class BaseModel(Model):
    class Meta:
        database = db
        legacy_table_names = False
